#ifndef ANALY_CONTROL_BAR_H
#define ANALY_CONTROL_BAR_H
#include <wx/panel.h>
#include <wx/spinctrl.h>
#include <wx/button.h>
#include <wx/stattext.h>
#include <wx/sizer.h>
#include <wx/progdlg.h>
#include <wx/listctrl.h>
#include "ImageDisplay.h"
#include "AnalyImage.h"

class AnalyControlBar : public wxPanel
{
public:
    AnalyControlBar(wxWindow* parent,ImageDisplay* display);
    virtual ~AnalyControlBar();
    void SetHandleArea(const wxSize& size);
    void SetImageData(unsigned char* imageData,long imageHeight,long imageWidth);
private:
    AnalyImage handleImage;

    wxSpinCtrl* spinThreshold;
    wxSpinCtrl* spinAreaX;
    wxSpinCtrl* spinAreaY;
    wxButton* btnExecute;
    wxButton* btnFilter;
    wxButton* btnExeImageList;
    wxListCtrl* listHandleImage;
    ImageDisplay* imageDisplay;
    
    void on_btnExeImageList_click(wxCommandEvent& event);
    void on_spinHandleArea_change(wxSpinEvent& event);
    void on_btnFilter_click(wxCommandEvent& event);
    void on_btnExecute_click(wxCommandEvent& event);
    void on_listHandleImage_select(wxListEvent& event);
};

enum class AnalyControlBarID
{
    spinThreshold=100,
    spinAreaX,
    spinAreaY,
    btnExecute,
    btnFilter,
    btnExeImageList,
    listHandleImage
};

#endif